package org.ceteca.explica.core.common;

import java.io.Serializable;

import org.ceteca.explica.core.common.BaseVO;

public class RateOT extends BaseVO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long idRate;
	private String name;
	private float percentIncrease;
	private float linearIncrease;
	
	private Integer version= new Integer(0);

	public RateOT() {
		super();

	}

	
	
	



	public long getIdRate() {
		return idRate;
	}







	public void setIdRate(long idRate) {
		this.idRate = idRate;
	}







	public String getName() {
		return name;
	}







	public void setName(String name) {
		this.name = name;
	}







	public float getPercentIncrease() {
		return percentIncrease;
	}







	public void setPercentIncrease(float percentIncrease) {
		this.percentIncrease = percentIncrease;
	}







	public float getLinearIncrease() {
		return linearIncrease;
	}







	public void setLinearIncrease(float linearIncrease) {
		this.linearIncrease = linearIncrease;
	}







	public long getVersion() {
		return version;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (idRate ^ (idRate >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RateOT other = (RateOT) obj;
		if (!this.name.equals(other.getName()))
			return false;
		if (this.linearIncrease!=other.getLinearIncrease())
			return false;
		if (this.percentIncrease!=other.getPercentIncrease())
			return false;
		return true;
	}

	@Override
	public boolean equals(Long id) {
		return id != null && this.idRate == id.longValue();
	}

	@Override
	public String getEntityId() {
		return InterfaceClients.EXPLICA_ENTITY_RATE_ID;

	}

	@Override
	public long getInternalId() {

		return idRate;
	}

	@Override
	public String getInternalValue() {

		return name;
	}







	public void setVersion(Integer version) {
		this.version = version;
	}
	

}
